<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var arr = [10, 100, 20, 55, 33, 17];
        var arryMax = function(arr) { //函数参数的传值，位置要对应

            var maxValue = 0;
            for (var i = 0; i < arr.length; i++) {
                if (arr[i] > maxValue) {
                    maxValue = arr[i];
                }
            }
            console.log(maxValue);
        }
        arrayMax(arr) //如何调用函数
    </script>
</body>

</html>